﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace RTS_RPG
{
    public class Item : Storable
    {
        public Texture2D image;
        public string name;
        public short price;
        public short amount;

        public Item(Texture2D _image, string _name, short _price)
        {
            image = _image;
            name = _name;
            price = _price;
            amount = 1;
        }

        public void draw(SpriteBatch spBatch, Vector2 location)
        {
            spBatch.Draw(image, location, Color.White);
        }

        public Boolean add(short number)
        {
            if (amount >= 10) return false;
            ++amount;
            return true;
        }
    }
}
